package com.lyz.myself.service;

import com.github.pagehelper.PageInfo;
import com.lyz.myself.pojo.Po.Leads;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @program: myself
 * @Date: 2019/2/14 15:58
 * @Author: Mr.Deng
 * @Description:
 */
public interface LeadsService {


    /**
     *添加线索
     * @mbg.generated 2019-02-14
     */
    int insertSelective(Leads record);

    /**
     *修改线索
     * @mbg.generated 2019-02-14
     */
    int updateByPrimaryKeySelective(Leads record);

    /**
     *根据id查看线索信息
     * @mbg.generated 2019-02-14
     */
    List<Map<String, String>> selectByPrimaryKey(Integer leads_id,Integer company_id);

    /**
     * 根据id删除线索(可批量删除）
     * @param delete_role_id
     * @param company_id
     * @param delete_time
     * @param list
     * @return
     */
    int deleteLeads(Integer delete_role_id,Integer company_id,Integer delete_time,List<Integer> list);

    /**
     * 我的线索
     * @param map
     * @return
     */
    PageInfo<Map<String,Object>> selectAllLeads(Map<String,Object> map);

    /**
     * 线索池（可查看本公司下所有的线索）
     * @param
     * @param map
     * @return
     */
    PageInfo<Map<String,Object>> selectAllPool(Map<String,Object> map);

    /**
     * 领取线索
     * @param list
     * @param have_time
     * @return
     */
    int getToReceive( List<Integer> list,Integer have_time,Integer owner_role_id);

    /**
     * 放入线索池
     * @param list
     * @return
     */
    int putCuePool(@Param("list") List<Integer> list);
}
